diff options
| author | Adam Soltys <[email protected]> | 2023-11-10 21:33:49 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-11 00:04:22 -0800 |
| commit | ae87f1d43c6d2cf34bd2ea6fd7b4d28af6d2aa91 (patch) | |
| tree | 694efda287338a3b81c5d7d41328c9f2e30e5218 /src/routes/(app)/[username]/(profile)/+layout.svelte | |
| parent | efdbc67c17fab67bf3cdce448a30aa82f62c5212 (diff) | |
| download | coinos-ui-ae87f1d43c6d2cf34bd2ea6fd7b4d28af6d2aa91.tar.gz coinos-ui-ae87f1d43c6d2cf34bd2ea6fd7b4d28af6d2aa91.zip | |
nav update
Diffstat (limited to 'src/routes/(app)/[username]/(profile)/+layout.svelte')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+layout.svelte | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+layout.svelte b/src/routes/(app)/[username]/(profile)/+layout.svelte index 35c316bb..8790aaf2 100644 --- a/src/routes/(app)/[username]/(profile)/+layout.svelte +++ b/src/routes/(app)/[username]/(profile)/+layout.svelte @@ -17,7 +17,7 @@ $: ({ currency, username: n, display } = subject); $: username = n.length > 60 ? n.substr(0, 6) : display || n; - $: npub = bech32m.encode('npub', toWords(hexToUint8Array(user.pubkey)), 180); + $: npub = bech32m.encode('npub', toWords(hexToUint8Array(subject.pubkey)), 180); $: lnaddr = `${n}@${$page.url.host}`; $: profile = `${$page.url.host}/${n}`; @@ -147,7 +147,7 @@ {#if following} <div class="w-full flex"> <button - class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white" + class="mx-auto rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60 bg-black text-white" on:click={unfollow} > <div class="mx-auto flex"> @@ -159,7 +159,7 @@ {:else} <div class="w-full flex"> <button - class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60" + class="mx-auto rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60" on:click={follow} > <div class="mx-auto flex"> @@ -171,29 +171,29 @@ {/if} {/if} - {#if !subject.anon && subject.username !== user?.username} - <div class="w-full flex"> - <a - href={user ? `/send/${subject.username}` : `/${subject.username}/receive`} - class="mx-auto" - > + {#if user && user.username !== subject.username && subject.pubkey} + <div class="w-full flex mb-4"> + <a href={`/${subject.username}/messages`} class="mx-auto"> <button class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60"> <div class="mx-auto flex"> - <Icon icon="send" style="mr-2" /> - <div class="mt-1">{$t('user.pay')}</div> + <Icon icon="support" style="mr-2 my-auto" /> + <div class="mt-1 my-auto">{$t('user.message')}</div> </div> </button> </a> </div> {/if} - {#if user && user.username !== subject.username && subject.pubkey} + {#if !subject.anon && subject.username !== user?.username} <div class="w-full flex"> - <a href={`/${subject.username}/messages`} class="mx-auto"> + <a + href={user ? `/send/${subject.username}` : `/${subject.username}/receive`} + class="mx-auto" + > <button class="rounded-full border py-3 px-6 font-bold hover:opacity-80 flex w-60"> <div class="mx-auto flex"> - <Icon icon="support" style="mr-2 my-auto" /> - <div class="mt-1 my-auto">{$t('user.message')}</div> + <Icon icon="send" style="mr-2" /> + <div class="mt-1">{$t('user.pay')}</div> </div> </button> </a> @@ -203,7 +203,7 @@ </div> <div class="w-full"> - <div class="mx-auto space-y-5 lg:max-w-lg xl:max-w-2xl lg:pl-10"> + <div class="mx-auto space-y-5 lg:max-w-xl lg:pl-10 xl:max-w-2xl lg:pl-10"> <slot /> </div> </div> |
